package cn.iocoder.yudao.module.scrm.controller.admin.invoice.vo;

import cn.iocoder.yudao.module.scrm.controller.admin.commom.vo.FileInfoVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Value;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;

@Schema(description = "管理后台 - 发票新增/修改 Request VO")
@Data
public class InvoiceSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11746")
    private Long id;

    @Schema(description = "订单号", example = "14738")
    private Long orderId;

    @Schema(description = "客户编号", example = "11871")
    private Long customerId;

    @Schema(description = "合同编号", example = "28282")
    private Long contractId;

    @Schema(description = "负责人编号", example = "7485")
    private String ownerUserId;

    @Schema(description = "发票类型", example = "2")
    private Integer invoiceType;

    @Schema(description = "出票公司")
    private String ticketCompany;

    @Schema(description = "公司全称", example = "张三")
    private String companyName;

    @Schema(description = "纳税人识别号")
    @Pattern(
            regexp = "^[a-zA-Z0-9]{10,22}$", // 正则表达式匹配10到20位的数字、大写字母和小写字母
            message = "纳税人识别号格式错误-只能为10到22位的数字与字母的组合"
    )
    private String taxNumber;

    @Schema(description = "注册地址")
    private String address;

    @Schema(description = "企业电话")
    @Pattern(regexp = "\\d+", message = "企业电话只输入数字")
    private String phoneNumber;

    @Schema(description = "客户对公账户", example = "31814")
    @Size(max = 20,message = "客户对公账户,最大为20个字符")
    private String account;

    @Schema(description = "开票项目名称", example = "张三")
    private String projectName;

    @Schema(description = "开票金额", example = "21492")
    @DecimalMin(value = "0.00", message = "金额必须为大于或者等于0.00")
    @Digits(integer = 11, fraction = 2, message = "金额只能有11个整数和两位小数")
    private BigDecimal price;

    @Schema(description = "会议（峰会）场次")
    private String meetingVenue;

    @Schema(description = "邀约人")
    private String inviter;

    @Schema(description = "是否报课")
    private String enroll;

    @Schema(description = "接收发票手机号码")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "请输入正确的手机号")
    private String acceptPhone;

    @Schema(description = "接收电子发票邮箱")
    @Email(message = "请输入正确的邮箱格式")
    private String acceptEmail;

    @Schema(description = "附件信息")
    private List<FileInfoVO> attachment;

    @Schema(description = "图片-附件信息")
    private List<FileInfoVO> pictureAttachment;


    @Schema(description = "工作流编号", example = "6450")
    private Long processInstanceId;

    /**
     * 0 未审批 1 审批中 2 审批通过 3 审批拒绝
     */
    @Schema(description = "审批状态", example = "2")
    private Integer auditStatus;

    @Schema(description = "备注信息", example = "你说的对")
    private String remark;

    @Schema(description = "收件地址")
    private String deliveryAddress;

    @Schema(description = "邀约人部门")
    private String inviterDept;

}